suppressed warning for flock and checked if header_remove is available
before using
Removed whitespace in beginning of file
header is now sent in the proprocess
small sample template change for spacing issue