Thanks i had just figured it out but you are right the problem was my RDWR flag as the proc files are in read-only mode.The correct flag was RDONLY.